﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using Model;


namespace MsDAL
{
    public partial class Sto8a01DAL : Sto8a01Base
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public override SqlApp Add(Model.Sto8a01 Sto8a01)
        {
            Sto8a01.Status = Components.Enum.ModelStatus.Changed;
            return base.Add(Sto8a01);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public override SqlApp Update(Model.Sto8a01 Sto8a01)
        {
            Sto8a01.Status = Components.Enum.ModelStatus.Changed;
            return base.Update(Sto8a01);
        }

        public override SqlApp Delete(Model.Sto8a01 Sto8a01)
        {
            Sto8a01.Status = Components.Enum.ModelStatus.Changed;
            return base.Delete(Sto8a01);
        }

        /// <summary>
        /// 根据Listid得到整个 Sto8a01对象,如果没查到，返回null
        /// </summary>
        /// <param name="Listid">该实体主键 Listid</param>
        /// <returns>实体Sto8a01的对象</returns>
        public override Model.Sto8a01 GetModelById(string Listid)
        {
            var Sto8a01 = base.GetModelById(Listid);

            if (Sto8a01 != null)
                Sto8a01.Status = Components.Enum.ModelStatus.Changed;

            return Sto8a01;
        }

        /// <summary>
        /// 根据条件和参数得到Sto8a01对象
        /// </summary>
        /// <param name="Condition">Sql条件</param>
        /// <param name="hs">参数和值</param>
        /// <returns></returns>
        public virtual Model.Sto8a01 GetModel(String Condition, Hashtable hs)
        {
            var Sto8a01 = base.GetModel(Condition, hs);

            if (Sto8a01 != null)
                Sto8a01.Status = Components.Enum.ModelStatus.Changed;

            return Sto8a01;
        }
    }
}
